/*
 * The MIT License (MIT)
 *
 * Copyright (c) 2017-2025 Ta4j Organization & respective
 * authors (see AUTHORS)
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of
 * this software and associated documentation files (the "Software"), to deal in
 * the Software without restriction, including without limitation the rights to
 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
 * the Software, and to permit persons to whom the Software is furnished to do so,
 * subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
/**
 * Analysis criteria.
 *
 * <p>
 * This package contains different criteria which can be used to calculate the
 * performance of a {@link org.ta4j.core.Strategy trading strategy} and to
 * compare two {@link org.ta4j.core.Strategy trading strategies} to each other.
 * <p>
 * <b>Return Representation System:</b>
 * <p>
 * Return-based and ratio-producing criteria use a unified representation system
 * for formatting returns and ratios:
 * <ul>
 * <li><b>{@link ReturnRepresentation}</b>: Defines return format types
 * (MULTIPLICATIVE, DECIMAL, PERCENTAGE, LOG) and provides conversion methods
 * between formats.
 * <li><b>{@link ReturnRepresentationPolicy}</b>: Manages the global default
 * return representation used across all criteria. Can be configured via system
 * property {@code -Dta4j.returns.representation=DECIMAL} or programmatically.
 * <li><b>{@link org.ta4j.core.analysis.Returns}</b>: Calculates return rates
 * from positions/trading records and formats them according to a specified
 * representation.
 * </ul>
 * <p>
 * <b>Return-based criteria</b> (e.g.,
 * {@link org.ta4j.core.criteria.pnl.NetReturnCriterion}) default to
 * <em>multiplicative</em> returns (neutral value {@code 1.0}). The default can
 * be changed globally via {@link ReturnRepresentationPolicy} or per-criterion
 * by passing a {@link ReturnRepresentation} to the criterion constructor.
 * <p>
 * <b>Ratio-producing criteria</b> (e.g., {@link VersusEnterAndHoldCriterion},
 * {@link org.ta4j.core.criteria.drawdown.ReturnOverMaxDrawdownCriterion},
 * {@link PositionsRatioCriterion}) default to <em>decimal</em> representation
 * (ratios are typically expressed as decimals, e.g., 0.5 for 50%). These
 * criteria convert ratio outputs to the configured representation format. For
 * example, a ratio of 0.5 (50% better) can be expressed as:
 * <ul>
 * <li>DECIMAL: 0.5 (50% better)
 * <li>PERCENTAGE: 50.0 (50% better)
 * <li>MULTIPLICATIVE: 1.5 (1 + 0.5 = 1.5, meaning 50% better)
 * </ul>
 * See each ratio-producing criterion's javadoc for specific examples and usage
 * guidance.
 */
package org.ta4j.core.criteria;
